From a5003f0c40b57251f6bed01fcca42e2933ffb6ad Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Wed, 3 Dec 2003 02:01:08 +0000 Subject: [PATCH] Added fake-o waypoint names to generated waypoints; GPS formats seem to care about having names. --- gpsbabel/saroute.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gpsbabel/saroute.c b/gpsbabel/saroute.c index 276967e8c..e92f0b32c 100644 --- a/gpsbabel/saroute.c +++ b/gpsbabel/saroute.c @@ -87,6 +87,7 @@ my_read(void) unsigned long recsize; unsigned char *record; unsigned short stringlen; + static int serial = 0; struct ll { long lat; long lon; @@ -150,6 +151,8 @@ my_read(void) wpt_tmp = xcalloc(sizeof (*wpt_tmp), 1); wpt_tmp->latitude = lat; wpt_tmp->longitude = -lon; + wpt_tmp->shortname = xmalloc(7); + sprintf( wpt_tmp->shortname, "\\%5.5x", serial++ ); route_add_wpt(track_head, wpt_tmp); } else { Skip(infile, recsize); @@ -212,6 +215,8 @@ my_read(void) wpt_tmp->latitude = lat; wpt_tmp->longitude = -lon; + wpt_tmp->shortname = xmalloc(7); + sprintf( wpt_tmp->shortname, "\\%5.5x", serial++ ); route_add_wpt(track_head, wpt_tmp); latlon++; -- 2.30.2